package com.qf.swagger2204.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class TestController {
    @GetMapping("/1")
    public String test1(String name){
        return "hello,"+name;
    }
    /*
    * 什么是查询字符串类型的参数
    * get请求，？name=zhangsan&age=19
    * post请求，方式一：？name=zhangsan&age=19
    * post请求，方式二：放入字符串
    * */
    @PostMapping("/2")
    public String regist(String name,Integer age){
        return "regist ok";
    }
}
